var M=require("ming_node");
var fs=require("fs");
//配置
M.config={
    serverPluginHtml:"https://minglie.gitee.io/ming_node_plugis/src/ming_node_plgins/MysqlTableListPlugin.js",
    pageUrl:"https://minglie.gitee.io/ming_node_plugis/src/ming_mock_plugins/page/layuitableList.html"
}

M.getMySql({
    database:"lj_node"
})
var app=M.server();
app.listen(8888);

//删除旧插件
if(fs.existsSync(M._node_lib_path+"/MysqlTableListPlugin.js")){
    fs.unlinkSync(M._node_lib_path+"/MysqlTableListPlugin.js")
}
const Api= require("ming_node/plugins/BaseRpcApi/MysqlBaseRpcApi");
let api = new Api({tableName:"member_statistics",generateTime:true})
app.installPlugin(M.config.serverPluginHtml,{
    api
},{
    pageUrl:M.config.pageUrl
});